package com.jt.www.domain.enums.common;

/**
 * 是否枚举
 * 1-是；0-否
 */
public enum IsOrNotEnum {

    IS((byte) 1, "是"),
    NO((byte) 0, "否");

    /**
     * code
     */
    private Byte value;
    /**
     * 描述
     */
    private String desc;

    IsOrNotEnum(Byte value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static boolean is(Byte value) {
        if (IS.value.equals(value)) {
            return true;
        }
        return false;
    }

    public static boolean not(Byte value) {
        return !is(value);
    }


    public Byte getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
}


